package com.xlcszsgc.core.page.commond;

import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.xlcszsgc.core.page.PageBean;
import com.xlcszsgc.core.page.PageInfoBean;

/**
 * Title: BasePageBean<br>
 * Description: 页面翻页属性基类，需要翻页的页面，域对象需要继承此类<br>
 * Company: ORCHIS<br>
 * Copyright @ 2011 ORCHIS .All rights reserved.<br>
 * @author WangWB
 * @createDate Aug 2, 2011
 * @version $Revision: 1.1 $
 */
public class BasePageCommond {

	protected PageInfoBean pageBean = new PageInfoBean();

	private String queryString;
	private Map<String, Object> paramMap = new HashMap<String, Object>();
	private boolean isPaging =  true; //是否进行分页查询默认true 
	/**
	 * 结果集
	 */
	private Collection<?> resultCollection;

	public Collection<?> getResultCollection() {
		return resultCollection;
	}

	public void setResultCollection(Collection<?> resultCollection) {
		this.resultCollection = resultCollection;
	}

	public PageInfoBean getPageBean() {
		return pageBean;
	}

	public void setPageBean(PageInfoBean pageBean) {
		this.pageBean = pageBean;
	}

	public int getCurrent() {
		return pageBean.getCurrent();
	}

	/**
	 * 页号,用于接收翻的当前页
	 * 
	 * @param current
	 */
	public void setCurrent(int current) {
		pageBean.setCurrent(current);
	}

	public int getPageCount() {
		return pageBean.getPageCount();
	}

	public int getCount() {
		return pageBean.getCount();
	}

	public int getPageListCount() {
		return pageBean.getPageListCount();
	}

	public int getPrevious() {
		return pageBean.getPrevious();
	}

	public int getNext() {
		return pageBean.getNext();
	}

	public List<PageBean> getPageNumList() {
		return (List<PageBean>) pageBean.getPageNumList();
	}

	public String getQueryString() {
		return queryString;
	}

	public void setQueryString(String queryString) {
		this.queryString = queryString;
	}

	public Map<String, Object> getParamMap() {
		return paramMap;
	}

	public void setParamMap(Map<String, Object> paramMap) {
		this.paramMap = paramMap;
	}

	public boolean isPaging() {
		return isPaging;
	}

	public void setPaging(boolean isPaging) {
		this.isPaging = isPaging;
	}

	public void setPageCount(int pageCount) {
		pageBean.setPageCount(pageCount);
	}

	public void setRowCount(int rowCount) {
		pageBean.setRowCount(rowCount);
	}
	
}
